<?php

namespace App\Models\Exm;

use Illuminate\Database\Eloquent\Model;

class Question extends Model
{
	protected $table = 'exm_questions';

    protected $guarded = array();


    public function options()
    {
        return $this->hasMany('\App\Models\Exm\Option');
    }


    public function item()
    {
    	return $this->belongsTo('\App\Models\Exm\Item');
    }

    public function corrects()
    {
        return $this->options->where('correct', STATUS_NORMAL);
    }

}